/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package lesson3.slides.net;

import java.net.*;

public class IPExample {

    public static void main(String[] args) {
      /*  if (args.length != 1) {
            System.err.println("Usage: java IPExample MachineName");
            System.exit(0);
        } */
        args = new String[]{"www.yahoo.com"};
        try {
            InetAddress ipAddress = InetAddress.getByName(args[0]);
            System.out.println(ipAddress);
        } catch (UnknownHostException e) {
            System.out.println("No IP address found for " + args[0]);
        }
    }
}